package com.bcmusic.order.dao;
import com.bcmusic.order.pojo.OrderCart;
import org.apache.ibatis.annotations.Select;
import org.springframework.web.bind.annotation.RequestParam;
import tk.mybatis.mapper.additional.idlist.IdListMapper;
import tk.mybatis.mapper.common.Mapper;
import tk.mybatis.mapper.common.special.InsertListMapper;

import java.util.List;

/****
 * @Author:admin
 * @Description:OrderCart的Dao
 * @Date 2019/6/14 0:12
 *****/
public interface OrderCartMapper extends Mapper<OrderCart>,InsertListMapper<OrderCart>, IdListMapper<OrderCart,Integer> {
    /**
     * 根据订单id查询购物车
     * @param orderId
     * @return
     */
    @Select("SELECT * FROM order_cart WHERE order_id = 1")
    public List<OrderCart> findCartListByOrderId(@RequestParam("order_id") Integer orderId);
}
